#include <jni.h>
#include <string>
#include <iostream>

extern "C"
JNIEXPORT void JNICALL
Java_com_example_ginorva_tryeverything_NDK_NDKActivity_tryTwo(JNIEnv *env, jobject instance) {
    // TODO
    using namespace std;
    string trytwo="HA,HA,HA,I finish it again!!!";
    jclass jniClass=env->FindClass("com/example/ginorva/tryeverything/NDK/NDKActivity");
    jmethodID jmethodID1=env->GetMethodID(jniClass,"LogTwo","()V");
    env->CallVoidMethod(instance,jmethodID1);
    return;
}

extern "C"
JNIEXPORT jstring JNICALL
Java_com_example_ginorva_tryeverything_NDK_NDKActivity_tryOne(JNIEnv *env, jobject instance) {
    // TODO
    using namespace std;
    string tryone="HA,HA,HA,I finish it!!!";
    return env->NewStringUTF(tryone.c_str());
}

extern "C"
JNIEXPORT jstring JNICALL
Java_com_example_ginorva_tryeverything_MainActivity_stringFromJNI(
        JNIEnv *env,
        jobject /* this */) {
    std::string hello = "Hello from C++";
    return env->NewStringUTF(hello.c_str());
}